package org.mags.dao.common;

import java.io.Serializable;

public class SOrder implements Serializable {
	private DirectionOrder direction;
	private Object property;
	private static final DirectionOrder DEFAULT_DIRECTION = DirectionOrder.asc;
	@Override
	public String toString() {
		String string = "";
		string = property==null?"null":property.toString();
		string = string + ", ";
		string = string + direction==null?"null":direction.toString();
		return string;
	}
	public SOrder(Object property, DirectionOrder direction) {
		this.property = property;
		this.direction = direction;
	}
	public DirectionOrder getDirection() {
		if(direction==null)
			direction = DEFAULT_DIRECTION;
		return direction;
	}
	public void setDirection(DirectionOrder direction) {
		this.direction = direction;
	}
	public Object getProperty() {
		return property;
	}
	public void setProperty(Object property) {
		this.property = property;
	}
}
